package cn.passlink.bletoothchat.mFragment;

import android.annotation.SuppressLint;
import android.bluetooth.BluetoothDevice;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
@SuppressLint("MissingPermission")
public class myViewModel extends ViewModel {

    private MutableLiveData<List<BluetoothDevice>> devicesLiveData = new MutableLiveData<>();

    public void setDevices(List<BluetoothDevice> devices) {

        devicesLiveData.setValue(devices);
    }

    public LiveData<List<BluetoothDevice>> getDevicesLiveData() {
        return devicesLiveData;
    }

}

